package de.slowpoke.flattr
{
	import de.slowpoke.flattr.Error.FlattrError;
	
	/**
	 * The Flattr class is the base. Instantiate an object and use it for several tasks.
	 */
	public class Flattr
	{

		private var _uid:Number;
		
		
		/** 
		 * Flattr
		 * @param flattr_userid This is your personal Flattr user id. Log in to Flattr to see it. 
		 */
		public function Flattr(flattr_userid:Number)
		{
			this.uid = flattr_userid;
		}
		
		public function set uid(uid:Number):void
		{
			if( isNaN(uid) || uid <= 0){
				throw new FlattrError(FlattrError.EMPTY_UID);
			} else {
				this._uid = uid;
			}
		}
		
		public function get uid():Number
		{
			return this._uid;
		}
		
		
		
	}
}